<?php

namespace App\Jobs;

use App\Models\User\WxUser;
use App\Models\User\WxUserFollow;
use App\Wen\Utils\GatewayUtils;
use App\Wen\Utils\UserUtils;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class UserBgColorUpdateJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
    public $tries = 1;
    protected $user_id = 0;
    protected $force_update_default = false;
    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($user_id, $force_update_default)
    {
        //
        $this->user_id = $user_id;
        $this->force_update_default = $force_update_default;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        UserUtils::user_bg_color_update($this->user_id, $this->force_update_default);
    }
}
